package com.example.nacosconsumer.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;

@RefreshScope
@RestController
public class ConsumerController {
    @Value("${consumer.name}")
    private String devConfig;

    /**
     * 这个是用来测试 消费端的接口是否正确
     * @return
     */
    @GetMapping("invoke")
    public String invoke() {
        return LocalTime.now() + " invoke,name:" + devConfig;
    }
}